package com.tongle.frs.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.tongle.frs.service.RabbitService;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * rabbit消息队列服务
 *
 * @author hyson
 * @create 2017-02-20 17:09
 */
@Component
@Service(version = "1.0.0")
public class RabbitServiceImpl implements RabbitService {
    @Autowired
    private AmqpTemplate rabbitTemplate;

    @Override
    public void send(String txt) {
        this.rabbitTemplate.convertAndSend("hello", txt);
    }

}
